<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
		<html>
		<head>
		<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
		<title>Curses</title>
		<META HTTP-EQUIV="EXPIRES" CONTENT=0>
		<link rel="stylesheet" href="../../../../docs.css">
		</head>
		<body>
		
<br>
<h1>Io Reference</h1>
<br><br><br>
<br><br><br>
<a class='column' href='../../index.html'>Server</a>
&nbsp;&nbsp;<font color=#ccc>/</font>&nbsp;&nbsp;
<a class='column' href='../index.html'>Curses</a>
&nbsp;&nbsp;<font color=#ccc>/</font>&nbsp;&nbsp;
<b>Curses</b>
<br><br><br>
<br><br><br>
<table border=0 cellspacing=0 style="margin-left:8em; width:40em; line-height:1.2em;">
<tr>
<td align=right></td>
<td></td>
<td>Curses allows writing and reading at arbitrary positions on the terminal. You have to call init to set the terminal to curses mode and end to end curses mode. The terminal is not updated until refresh is called. It is a bad idea to use the standard io's read and write methods when the terminal is in curses mode. The Curses primitive was written by Edwin Zacharias.
<BR><BR>
Here's an example that prints Hello at column 5 and row 7;
<p>
<pre>
Curses init
Curses move(5, 7) print(\"Hello\")
Curses refresh
Curses end
</pre>
</td></tr>
<tr><td colspan=3>&nbsp;</td></tr>
<tr><td colspan=3>&nbsp;</td></tr>
<tr><td colspan=3>&nbsp;</td></tr>
<tr>
<td align=right>
</td>
<td></td>
<td>
<hr align=left color=#ddd height=1>
<br><br>
<a name="Curses-begin"></a><b>
begin
</b>
<p>
<div class=slotDescription>
Sets the terminal to curses mode.
	This should be called before any other curses methods.
	Returns self.
</div>
<a name="Curses-cBreak"></a><b>
cBreak(aString)
</b>
<p>
<div class=slotDescription>
Disables line buffering and erase/kill character-processing.
	cBreak should be on for most purposes. Returns self.
</div>
<a name="Curses-clear"></a><b>
clear
</b>
<p>
<div class=slotDescription>
Clears the terminal. Nicer than erase. Returns self.
</div>
<a name="Curses-clearToEndOfLine"></a><b>
clearToEndOfLine
</b>
<p>
<div class=slotDescription>
Clears the text from the cursor to the end of the line. Returns self.
</div>
<a name="Curses-delete"></a><b>
delete(n)
</b>
<p>
<div class=slotDescription>
Deletes n characters at the current position. Text to the right is shifted left.
	n is optional and defaults to 1. Returns self.
</div>
<a name="Curses-echo"></a><b>
echo
</b>
<p>
<div class=slotDescription>
Echoes user input to terminal. Returns self.
</div>
<a name="Curses-end"></a><b>
end
</b>
<p>
<div class=slotDescription>
Ends curses mode. This should be called before standard io's read
	and write methods are used. Returs self.
</div>
<a name="Curses-get"></a><b>
get(n)
</b>
<p>
<div class=slotDescription>
Returns n characters from the terminal. n is optional and defaults to 1.
</div>
<a name="Curses-getCh"></a><b>
getCh
</b>
<p>
<div class=slotDescription>
Reads a single-byte character from the terminal associated with the
	current or specified window. Returns a Number containing the byte.
</div>
<a name="Curses-hasColors"></a><b>
hasColors
</b>
<p>
<div class=slotDescription>
Returns true if the terminal supports color, false otherwise.
</div>
<a name="Curses-height"></a><b>
height
</b>
<p>
<div class=slotDescription>
Returns a Number containing the height of the current screen.
</div>
<a name="Curses-input"></a><b>
input(n)
</b>
<p>
<div class=slotDescription>
Returns user input up to a return, or a maximun of n characters.
</div>
<a name="Curses-insert"></a><b>
insert(aString)
</b>
<p>
<div class=slotDescription>
Inserts the string at the current position on the terminal,
	pushing existing text to the right. Returns self.
</div>
<a name="Curses-move"></a><b>
move(x, y)
</b>
<p>
<div class=slotDescription>
Moves the cursor to column x and row y on the terminal.
	(0, 0) is at the top-left of the terminal. Returns self.
	- Be careful if you are used to the C implementation of Curses
	- as the coordinates are the other way around. Here they are like
	- graphical XY coordinates, whereas in C Curses the rational is
	- more like typing text. You go down on the line you want and then
	- you move horizontally.
</div>
<a name="Curses-noCBreak"></a><b>
noCBreak
</b>
<p>
<div class=slotDescription>
Allows line buffering and erase/kill character-processing.
	cBreak should be on for most purposes. Returns self.
</div>
<a name="Curses-noEcho"></a><b>
noEcho
</b>
<p>
<div class=slotDescription>
Does not echo user input to terminal. Returns self.
</div>
<a name="Curses-nodelay"></a><b>
nodelay(aBoolean)
</b>
<p>
<div class=slotDescription>
Enables or disables block during read.
	If aNumber is zero, nodelay is set to be false, otherwise it is set to be true.
</div>
<a name="Curses-print"></a><b>
print(aString)
</b>
<p>
<div class=slotDescription>
Prints the string to the current position on the terminal,
	overwriting existing text on the terminal. Returns self.
</div>
<a name="Curses-refresh"></a><b>
refresh
</b>
<p>
<div class=slotDescription>
Copies the current buffer to the screen. This must be called to make
	changes to the screen. Returns self.
</div>
<a name="Curses-scroll"></a><b>
scroll(num)
</b>
<p>
<div class=slotDescription>
Scrolls up num lines.
    num is optional and defaults to 1. Returns self.
</div>
<a name="Curses-scrollok"></a><b>
scrollok(aBoolean)
</b>
<p>
<div class=slotDescription>
Enables / Disables automatic scrolling. Return self.
</div>
<a name="Curses-setBackgroundBlack"></a><b>
setBackgroundBlack
</b>
<p>
<div class=slotDescription>
Sets the background color to black.
</div>
<a name="Curses-setBackgroundBlue"></a><b>
setBackgroundBlue
</b>
<p>
<div class=slotDescription>
Sets the background color to blue.
</div>
<a name="Curses-setBackgroundCyan"></a><b>
setBackgroundCyan
</b>
<p>
<div class=slotDescription>
Sets the background color to cyan.
</div>
<a name="Curses-setBackgroundGreen"></a><b>
setBackgroundGreen
</b>
<p>
<div class=slotDescription>
Sets the background color to green.
</div>
<a name="Curses-setBackgroundMagenta"></a><b>
setBackgroundMagenta
</b>
<p>
<div class=slotDescription>
Sets the background color to magenta.
</div>
<a name="Curses-setBackgroundRed"></a><b>
setBackgroundRed
</b>
<p>
<div class=slotDescription>
Sets the background color to red.
</div>
<a name="Curses-setBackgroundWhite"></a><b>
setBackgroundWhite
</b>
<p>
<div class=slotDescription>
Sets the background color to white.
</div>
<a name="Curses-setBackgroundYellow"></a><b>
setBackgroundYellow
</b>
<p>
<div class=slotDescription>
Sets the background color to yellow.
</div>
<a name="Curses-setForegroundBlack"></a><b>
setForegroundBlack
</b>
<p>
<div class=slotDescription>
Sets the foreground color to black.
</div>
<a name="Curses-setForegroundBlue"></a><b>
setForegroundBlue
</b>
<p>
<div class=slotDescription>
Sets the foreground color to blue.
</div>
<a name="Curses-setForegroundCyan"></a><b>
setForegroundCyan
</b>
<p>
<div class=slotDescription>
Sets the foreground color to cyan.
</div>
<a name="Curses-setForegroundGreen"></a><b>
setForegroundGreen
</b>
<p>
<div class=slotDescription>
Sets the foreground color to green.
</div>
<a name="Curses-setForegroundMagenta"></a><b>
setForegroundMagenta
</b>
<p>
<div class=slotDescription>
Sets the foreground color to magenta.
</div>
<a name="Curses-setForegroundRed"></a><b>
setForegroundRed
</b>
<p>
<div class=slotDescription>
Sets the foreground color to red.
</div>
<a name="Curses-setForegroundWhite"></a><b>
setForegroundWhite
</b>
<p>
<div class=slotDescription>
Sets the foreground color to white.
</div>
<a name="Curses-setForegroundYellow"></a><b>
setForegroundYellow
</b>
<p>
<div class=slotDescription>
Sets the foreground color to yellow.
</div>
<a name="Curses-setScrollingRegion"></a><b>
setScrollingRegion(top, bottom)
</b>
<p>
<div class=slotDescription>
Sets the scrolling region; top and bottom are the line numbers of the top
    and button margin. Returns self.
</div>
<a name="Curses-width"></a><b>
width
</b>
<p>
<div class=slotDescription>
Returns a Number containing the width of the current screen.
</div>
<a name="Curses-writeCharacter"></a><b>
writeCharacter(aCharacter)
</b>
<p>
<div class=slotDescription>
Prints the aCharacter to the current position on the terminal,
	overwriting existing text on the terminal. Returns self.
</div>
<a name="Curses-x"></a><b>
x
</b>
<p>
<div class=slotDescription>
Returns the cursor x position.
</div>
<a name="Curses-y"></a><b>
y
</b>
<p>
<div class=slotDescription>
Returns the cursor y position.
</div>
</td>
</tr>
</table>
<br><br><br><br><br>
</body>
</html>
